package com.infore.siteManagement.entity.equipment;

import java.io.Serializable;
import java.util.Set;

import javax.persistence.*;

import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

import com.infore.siteManagement.entity.SiteBasicFile;

/**
 * The persistent class for the EQUIPMENT_MODEL database table.
 * 
 */
@Entity
@Table(name = "EQUIPMENT_MODEL")
@NamedQuery(name = "EquipmentModel.findAll", query = "SELECT e FROM EquipmentModel e")
public class EquipmentModel implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name = "ID")
	@GeneratedValue(generator = "uuidGenerator")
	@GenericGenerator(name = "uuidGenerator", strategy = "uuid") // UUID生成策略
	private String id;

	/** 分析方法 **/
	@Column(name = "ANALYSIS_METHOD")
	private String analysisMethod;

	/** 浓度单位 **/
	@Column(name = "CONCEN_UNIT")
	private String concenUnit;

	/** 仪器名称 **/
	@Column(name = "EQUIPMENT_NAME")
	private String equipmentName;

	/** 标准下限 **/
	@Column(name = "LOWER_LIMIT")
	private String lowerLimit;

	/** 标准上限 **/
	@Column(name = "UPPER_LIMIT")
	private String upperLimit;

	/** 仪器生产厂家 **/
	@Column(name = "WOOCU")
	private String woocu;
	
	/** 仪器下试剂 **/
	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
	@JoinColumn(name = "EQUIP_MODEL_ID")
	@NotFound(action = NotFoundAction.IGNORE)
	private Set<EquipAndReagent> equipAndReagents;

	/*** 仪器下解决措施 */
	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
	@JoinColumn(name = "EQUIP_MODEL_ID")
	@NotFound(action = NotFoundAction.IGNORE)
	private Set<EquipSolution> equipSolutions;

	/** 仪器下备品备件 **/
	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
	@JoinColumn(name = "EQUIP_MODEL_ID")
	@NotFound(action = NotFoundAction.IGNORE)
	private Set<EquipSparePart> equipSpareParts;

	/**检出限**/
	@Column(name = "DETECTION_LIMIT")
	private String detectionLimit;

	/** 仪器下图片 **/
	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
	@JoinColumn(name = "EQUIP_MODEL_IMAGE")
	@NotFound(action = NotFoundAction.IGNORE)
	private Set<SiteBasicFile> images;

	/** 仪器下附件 **/
	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
	@JoinColumn(name = "EQUIP_MODEL_ACCESSORY")
	@NotFound(action = NotFoundAction.IGNORE)
	private Set<SiteBasicFile> accessory;

	public EquipmentModel() {
	}

	public String getDetectionLimit() {
		return detectionLimit;
	}

	public void setDetectionLimit(String detectionLimit) {
		this.detectionLimit = detectionLimit;
	}

	public Set<SiteBasicFile> getImages() {
		return images;
	}

	public void setImages(Set<SiteBasicFile> images) {
		this.images = images;
	}

	public Set<SiteBasicFile> getAccessory() {
		return accessory;
	}

	public void setAccessory(Set<SiteBasicFile> accessory) {
		this.accessory = accessory;
	}

	public Set<EquipAndReagent> getEquipAndReagents() {
		return equipAndReagents;
	}

	public void setEquipAndReagents(Set<EquipAndReagent> equipAndReagents) {
		this.equipAndReagents = equipAndReagents;
	}

	public Set<EquipSolution> getEquipSolutions() {
		return equipSolutions;
	}

	public void setEquipSolutions(Set<EquipSolution> equipSolutions) {
		this.equipSolutions = equipSolutions;
	}

	public Set<EquipSparePart> getEquipSpareParts() {
		return equipSpareParts;
	}

	public void setEquipSpareParts(Set<EquipSparePart> equipSpareParts) {
		this.equipSpareParts = equipSpareParts;
	}

	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getAnalysisMethod() {
		return this.analysisMethod;
	}

	public void setAnalysisMethod(String analysisMethod) {
		this.analysisMethod = analysisMethod;
	}

	public String getConcenUnit() {
		return this.concenUnit;
	}

	public void setConcenUnit(String concenUnit) {
		this.concenUnit = concenUnit;
	}

	public String getEquipmentName() {
		return this.equipmentName;
	}

	public void setEquipmentName(String equipmentName) {
		this.equipmentName = equipmentName;
	}

	public String getLowerLimit() {
		return this.lowerLimit;
	}

	public void setLowerLimit(String lowerLimit) {
		this.lowerLimit = lowerLimit;
	}

	public String getUpperLimit() {
		return this.upperLimit;
	}

	public void setUpperLimit(String upperLimit) {
		this.upperLimit = upperLimit;
	}

	public String getWoocu() {
		return this.woocu;
	}

	public void setWoocu(String woocu) {
		this.woocu = woocu;
	}

}